package com.zhang.publisher.service.impl;

import com.zhang.publisher.bean.ProductStats;
import com.zhang.publisher.mapper.ProductStatsMapper;
import com.zhang.publisher.service.ProductStatsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

/**
 * @title:
 * @author: zhang
 * @date: 2022/3/17 15:01
 */
@Service
public class ProductStatsServiceImpl implements ProductStatsService {

    @Autowired
    private ProductStatsMapper productStatsMapper;

    @Override
    public BigDecimal getGmv(Integer date) {
        return productStatsMapper.selectGmv(date);
    }

    @Override
    public List<ProductStats> selectProductStatsByTrademark(Integer date, Integer limit) {
        return productStatsMapper.selectProductStatsByTrademark(date,limit);
    }

    @Override
    public List<ProductStats> selectProductStatsByCategory3(Integer date, Integer limit) {
        return productStatsMapper.selectProductStatsByCategory3(date, limit);
    }

    @Override
    public List<ProductStats> selectProductStatsBySpu(Integer date, Integer limit) {
        return productStatsMapper.selectProductStatsBySpu(date, limit);
    }
}
